﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;

namespace Com.CMS263.BLL
{
    public class LoginLogBLL : BaseBLL<LoginLog>
    {
        public LoginLog entity = new LoginLog();
        LoginLogDAO dao = new LoginLogDAO();
        public override LoginLog GetModel()
        {
            return entity;
        }
        /// <summary>
        /// 分页查询所有登录日志
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<LoginLog> GetLoginLogListByPaging(int page, int pagesize)
        {
            return dao.GetLoginLogListByPaging(page, pagesize);
        }
        /// <summary>
        /// 查询登录日志总数
        /// </summary>
        /// <returns></returns>
        public int GetLoginLogListByPaging()
        {
            return dao.GetLoginLogListByPaging();
        }
        /// <summary>
        /// 根据用户id分页查询登录日志
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<LoginLog> GetLoginLogListByUser(int userid, int page, int pagesize)
        {
            return dao.GetLoginLogListByUser(userid, page, pagesize);
        }
        /// <summary>
        /// 根据用户查询登录日志总数
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        public int GetLoginLogListByUser(int userid)
        {
            return dao.GetLoginLogListByUser(userid);
        }
    }
}
